using System;
using System.Globalization;

namespace ns20
{
	internal static class Class194
	{
		public static bool smethod_0(object object_0, object object_1)
		{
			if (object_0 == null && object_1 == null)
			{
				return true;
			}
			if (object_0 != null && object_1 == null)
			{
				return false;
			}
			if (object_0 == null && object_1 != null)
			{
				return false;
			}
			if (object_0.GetType() != object_1.GetType())
			{
				if (Class182.smethod_14(object_0) && Class182.smethod_14(object_1))
				{
					return Convert.ToDecimal(object_0, CultureInfo.CurrentCulture).Equals(Convert.ToDecimal(object_1, CultureInfo.CurrentCulture));
				}
				if ((!(object_0 is double) && !(object_0 is float) && !(object_0 is decimal)) || (!(object_1 is double) && !(object_1 is float) && !(object_1 is decimal)))
				{
					return false;
				}
				return Class193.smethod_5(Convert.ToDouble(object_0, CultureInfo.CurrentCulture), Convert.ToDouble(object_1, CultureInfo.CurrentCulture));
			}
			return object_0.Equals(object_1);
		}

		public static ArgumentOutOfRangeException smethod_1(string string_0, object object_0, string string_1)
		{
			string message = string_1 + Environment.NewLine + "Actual value was {0}.".smethod_0(CultureInfo.InvariantCulture, object_0);
			return new ArgumentOutOfRangeException(string_0, message);
		}

		public static string smethod_2(object object_0)
		{
			if (object_0 == null)
			{
				return "{null}";
			}
			if (!(object_0 is string))
			{
				return object_0.ToString();
			}
			return "\"" + object_0.ToString() + "\"";
		}

		public static int smethod_3(byte[] byte_0, byte[] byte_1)
		{
			int num = byte_0.Length.CompareTo(byte_1.Length);
			if (num != 0)
			{
				return num;
			}
			int num2 = 0;
			int num3;
			while (true)
			{
				if (num2 < byte_0.Length)
				{
					num3 = byte_0[num2].CompareTo(byte_1[num2]);
					if (num3 != 0)
					{
						break;
					}
					num2++;
					continue;
				}
				return 0;
			}
			return num3;
		}

		public static string smethod_4(string string_0)
		{
			smethod_6(string_0, out var string_, out var _);
			return string_;
		}

		public static string smethod_5(string string_0)
		{
			smethod_6(string_0, out var _, out var string_2);
			return string_2;
		}

		public static void smethod_6(string string_0, out string string_1, out string string_2)
		{
			int num = string_0.IndexOf(':');
			if (num != -1 && num != 0 && string_0.Length - 1 != num)
			{
				string_1 = string_0.Substring(0, num);
				string_2 = string_0.Substring(num + 1);
			}
			else
			{
				string_1 = null;
				string_2 = string_0;
			}
		}

		internal static string smethod_7(object object_0)
		{
			if (object_0 == null)
			{
				return "{null}";
			}
			if (object_0 is string)
			{
				return string.Concat("\"", object_0, "\"");
			}
			return object_0.ToString();
		}
	}
}
